package com.nowcoder.community;

/**
 * @author szq
 * @create 2023-03-09 23:13
 * @description
 */
public class Person {
    int id;
    String name;
    // 需要提供无参构造器
    public Person() {
    }

    public Person(int id, String name) {
        this.id = id;
        this.name = name;
    }
    // 提供 setter/getter
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Person{" +
                "id=" + id +
                ", name='" + name + '\'' +
                '}';
    }
}
